let $results := doc("results")
let $xp := doc("xp")
return 
	insert node $results/results into $xp/ranking/historyResults